# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>

pkgname=wavegain
_realname=WaveGain
pkgver=1.3.1
pkgrel=4
pkgdesc="A command line tool to normalize sound files"
arch=('loong64' 'x86_64')
url="http://rarewares.org/others.php"
license=('LGPL')
depends=('libsndfile')
source=(http://www.rarewares.org/files/others/$pkgname-${pkgver}srcs.zip)
sha512sums=('6ce78c3fd238d49f47df5108c050f7be222778ab4cc8cbe7aeef518a0f925950c527c513a38d8c044b88157e22e581b496d9415f2c76f71010a412789165dd59')

build() {
  cd "$srcdir/$_realname-$pkgver"

  CFLAGS+=' -fcommon' # https://wiki.gentoo.org/wiki/Gcc_10_porting_notes/fno_common

  #make -f Makefile.linux
  gcc ${LDFLAGS} ${CFLAGS} *.c -o wavegain -DHAVE_CONFIG_H -lm

}

package() {
  cd "$srcdir/$_realname-$pkgver"

  install -Dm755 "$srcdir/$_realname-$pkgver/wavegain" \
    "$pkgdir/usr/bin/wavegain"
}

# vim:set ts=2 sw=2 et:
